

source("http://bioconductor.org/biocLite.R")
biocLite("DESeq2")
biocLite("geneLenDataBase")
biocLite("BiasedUrn")
biocLite("goseq")




detach("package:rgsepd",unload=TRUE)
remove.packages("rgsepd")

install.packages("../rgsepd_0.99.9.tar.gz",type="source",repos=NULL)


library(rgsepd)


data("IlluminaBodymap")
data("IlluminaBodymapMeta")
set.seed(1000) #fixed randomness
isoform_ids <- Name_to_RefSeq(c("GAPDH","HIF1A","EGFR","MYH7","CD33","BRCA2"))

rows_of_interest <- unique( c( isoform_ids ,
                               sample(rownames(IlluminaBodymap),
                                      size=2000,replace=FALSE)))
G <- GSEPD_INIT( finalCounts=round(IlluminaBodymap[rows_of_interest , ]),
                 sampleMeta=IlluminaBodymapMeta,
                 COLORS=c("green","black","red"))
G <- GSEPD_ChangeConditions( G, c("A","B"))

#G$Segregation_Precision <- 0.10 #chunky and fast

#Rprof()
G <- GSEPD_Process( G )
#Rprof(NULL)

srp <- summaryRprof()
head(srp$by.self,10)
head(srp$by.total)


